# -*- coding: utf-8 -*-

import json
import pylab
t = []
p = []
with open("../jsonfiles/data.json",'r') as fh:
	for line in fh:
		try:
			s = json.loads(line)
			[hour, minute, second] = [float(_t) for _t in s['time'].split(':')]
			if s['price'] != 0 :
				t.append(second + 60*minute + 60*60*hour)
				p.append(s['price'])
		except Exception, e:
			pass
fh.close
pylab.plot(t, p, 'b,-')
pylab.show()
